import http from "@/api";
import { PORT1 } from "@/api/config/servicePort";

export const menuDetail = (params?: object) => {
  return http.get(PORT1 + `/system/menu/detail`, params, { noLoading: false });
};

//菜单列表
export const menuList = (params?: object) => {
  return http.get(PORT1 + `/system/menu/index`, params, { noLoading: false });
};

//菜单树形列表
export const menuTree = (params?: object) => {
  return http.get(PORT1 + `/system/menu/tree`, params, { noLoading: false });
};

//菜单添加
export const menuCreate = (params: object) => {
  return http.post(PORT1 + `/system/menu/create`, params, { noLoading: false });
};

//菜单修改
export const menuUpdate = (params: object) => {
  return http.post(PORT1 + `/system/menu/modify`, params, { noLoading: false });
};

//菜单隐藏修改
export const menuUpdateHide = (params: object) => {
  return http.post(PORT1 + `/system/menu/hide`, params, { noLoading: false });
};
//菜单删除
export const menuDel = (params: object) => {
  return http.get(PORT1 + `/system/menu/delete`, params, { noLoading: false });
};

//角色详细
export const roleDetail = (params?: object) => {
  return http.get(PORT1 + `/system/role/detail`, params, { noLoading: false });
};
//角色列表
export const roleList = (params?: object) => {
  return http.get(PORT1 + `/system/role/index`, params, { noLoading: false });
};

//角色列表
export const roleTree = (params?: object) => {
  return http.get(PORT1 + `/system/role/tree`, params, { noLoading: false });
};

//角色商品列表
export const roleShop = (params?: object) => {
  return http.get(PORT1 + `/system/role/shop`, params, { noLoading: false });
};
//角色添加
export const roleCreate = (params?: object) => {
  return http.post(PORT1 + `/system/role/create`, params, { noLoading: false });
};
//角色修改
export const roleUpdate = (params?: object) => {
  return http.post(PORT1 + `/system/role/modify`, params, { noLoading: false });
};
//角色删除
export const roleDel = (params?: object) => {
  return http.get(PORT1 + `/system/role/del`, params, { noLoading: false });
};
//角色状态
export const roleStatus = (params?: object) => {
  return http.post(PORT1 + `/system/role/status`, params, { noLoading: false });
};
//角色权限
export const roleAuth = (params: object) => {
  return http.get(PORT1 + `/system/roleauth/index`, params, { noLoading: false });
};
//角色权限
export const roleAuthSave = (params: object) => {
  return http.post(PORT1 + `/system/roleauth/save`, params, { noLoading: false });
};

//账户列表
export const accountList = (params: object) => {
  return http.get(PORT1 + `/system/user/index`, params, { noLoading: false });
};
//账户启用
export const accountEnable = (params: object) => {
  return http.post(PORT1 + `/system/user/enable`, params, { noLoading: false });
};
//账户禁用
export const accountDisable = (params: object) => {
  return http.post(PORT1 + `/system/user/disable`, params, { noLoading: false });
};
//账户详细
export const accountDetail = (params?: object) => {
  return http.get(PORT1 + `/system/user/detail`, params, { noLoading: false });
};
//账户密码
export const accountUpdatePassword = (params?: object) => {
  return http.post(PORT1 + `/system/user/updatePassword`, params, { noLoading: false });
};

//企业组织列表
export const branchList = (params: object) => {
  return http.get(PORT1 + `/system/branch/index`, params, { noLoading: false });
};

//企业组织创建
export const branchCreate = (params: object) => {
  return http.post(PORT1 + `/system/branch/create`, params, { noLoading: false });
};
//企业组织创建
export const branchUpdate = (params: object) => {
  return http.post(PORT1 + `/system/branch/modify`, params, { noLoading: false });
};
//企业组织详情
export const branchDetail = (params: object) => {
  return http.get(PORT1 + `/system/branch/detail`, params, { noLoading: false });
};

//职位列表
export const positionList = (params: object) => {
  return http.get(PORT1 + `/system/position/index`, params, { noLoading: false });
};
//职位添加
export const positionCreate = (params: object) => {
  return http.post(PORT1 + `/system/position/create`, params, { noLoading: false });
};
//职位修改
export const positionModify = (params: object) => {
  return http.post(PORT1 + `/system/position/modify`, params, { noLoading: false });
};
//职位详情
export const positionDetail = (params: object) => {
  return http.get(PORT1 + `/system/position/detail`, params, { noLoading: false });
};
//职位删除
export const positionDel = (params: object) => {
  return http.get(PORT1 + `/system/position/del`, params, { noLoading: false });
};
//职位状态
export const positionStatus = (params?: object) => {
  return http.post(PORT1 + `/system/position/status`, params, { noLoading: false });
};

//部门列表
export const departmentList = (params: object) => {
  return http.get(PORT1 + `/system/department/index`, params, { noLoading: false });
};

//部门添加
export const departmentCreate = (params: object) => {
  return http.post(PORT1 + `/system/department/create`, params, { noLoading: false });
};

//部门修改
export const departmentModify = (params: object) => {
  return http.post(PORT1 + `/system/department/modify`, params, { noLoading: false });
};

//部门详情
export const departmentDetail = (params: object) => {
  return http.get(PORT1 + `/system/department/detail`, params, { noLoading: false });
};

//部门删除
export const departmentDel = (params: object) => {
  return http.get(PORT1 + `/system/department/del`, params, { noLoading: false });
};

//部门状态
export const departmentStatus = (params?: object) => {
  return http.post(PORT1 + `/system/department/status`, params, { noLoading: false });
};

//员工列表
export const staffList = (params: object) => {
  return http.get(PORT1 + `/system/staff/index`, params, { noLoading: false });
};

//员工添加
export const staffCreate = (params: object) => {
  return http.post(PORT1 + `/system/staff/create`, params, { noLoading: false });
};

//员工修改
export const staffModify = (params: object) => {
  return http.post(PORT1 + `/system/staff/modify`, params, { noLoading: false });
};

//员工详情
export const staffDetail = (params: object) => {
  return http.get(PORT1 + `/system/staff/detail`, params, { noLoading: false });
};

//员工删除
export const staffDel = (params: object) => {
  return http.get(PORT1 + `/system/staff/del`, params, { noLoading: false });
};

//员工状态
export const staffStatus = (params?: object) => {
  return http.post(PORT1 + `/system/staff/status`, params, { noLoading: false });
};
